<%@ page language="java" import="java.util.*,com.sirenbang.easyshop.config.*" pageEncoding="UTF-8"%>
<%@ include  file="/jsps/front/common/taglibs.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    
    <title>  -订单结算-  </title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="<c:url value="/jsps/front/css/application.css"></c:url>">
	<link rel="stylesheet" type="text/css" href="<c:url value="/jsps/front/css/shop_main.css"/>">
    <link rel="stylesheet" type="text/css" href="<c:url value="/jsps/front/css/head.css"/>">
  </head>
  <style>
	
	#container{
		/*border:1px solid #000000;*/
		float:left;
		width:100%;
		height:100%;
	}
	#headerDiv{
		float:left;
		clear:both;
		width:100%;
	}
	
	#welcome_notice {
		BORDER-RIGHT: #a7a7a7 1px solid;
		PADDING-RIGHT: 7px;
		BORDER-TOP: #a7a7a7 1px;
		PADDING-LEFT: 19px;
		PADDING-BOTTOM: 0px;
		BORDER-LEFT: #a7a7a7 1px solid;
		PADDING-TOP: 0px;
		BORDER-BOTTOM: #a7a7a7 1px solid;
		HEIGHT: 25px;
		BACKGROUND-COLOR: #fffbf0;
	}
	
	#headerBodyDiv{
		/*border:1px solid red;*/
		PADDING-BOTTOM: 9px;
		border:1px solid #878787;
		width:100%;
	}
	
	#headerLogDiv{
		/*BORDER-RIGHT: #878787 1px solid;*/
		PADDING-LEFT: 25px;
		/*BORDER-LEFT: #878787 1px solid;*/
		PADDING-TOP: 14px;
		padding-left:5px;
		HEIGHT: 50px;
	}
	.order_step{
		FONT-SIZE: 14px;
		MARGIN: auto;
		WIDTH: 960px;
		HEIGHT: 40px;
		TEXT-ALIGN: center;
	}
	
	#containerBodyDiv{
		/*border:1px solid green;*/
		padding-left:55px;
		padding-right:55px;
		width:100%;
		height:100%;
	}
	#containerBodyDiv #detail{
		/*border:1px solid red;*/
		width:100%;
		height:100%;
	}
	
	#containerBodyDiv #detail #detailHeader{
		font-size:16px;
		font-weight:bold;
		font-family:"宋体", Arial, Helvetica, sans-serif;
	}
	
	
	#line{
		margin-top:5px;
		COLOR: #404040;
	}
	
	#reciverUpdateInforDiv{
		
		padding-left:50px;
		font-size:12px;
		font-family:"宋体", Arial, Helvetica, sans-serif;
		
	}

	#postUpdateInfor{
		padding-left:50px;
		font-size:12px;
		font-family:"宋体", Arial, Helvetica, sans-serif;
		
	}

	#payWayUpdateInfor{
		padding-left:50px;
		font-size:12px;
		font-family:"宋体", Arial, Helvetica, sans-serif;
		
	}
	
	#merchandiseShowInfor table{
		font-size:14px;
		font-family:"宋体", Arial, Helvetica, sans-serif;
		COLOR: #404040;
		margin-top:2px;
	    border:1px solid #F9F8F5;
	    width:100%;
	}
	
	.listTitle{
	  padding-left:9px;
	  padding-top:5px;
	  padding-bottom:5px;
	  font-weight:bold;
	  color:#003366;
	  border-bottom:1px solid #c1cdd8;
	  background:#dee7fa; 
	}
	
	.listable{
	   margin-top:2px;
	   border:1px solid #ffffff;
	   width:99%;
	}
	
	.listable TD{
	   border-bottom:1px dotted #CCCCCC;
	   height:23px;
	   padding:1px;
	   text-align:left;
	}
	
	.listable Th{
	   height:23px;
	   text-align:left;
	}
	
	#headerFooterDiv{
		 padding-top:12px;
	}
	#detail{
		border:1px solid #878787;
		padding-left:50px;
		padding-right:50px;
		padding-top:30px;
	}
	
	#shadow{
		
		background:url(<c:url value="/jsps/front/images/bg_t_shadow.gif"/>) repeat-x 50% top;
		height:1px;
	}
</style>
<script type="text/javascript" src="<c:url value="/js/common.js"/>"></script>
<script type="text/javascript">
		function goBalance(){
			if(ckOrderForm()==true){
				if(confirm('你确定已经核实完定单，并且准备提交吗？')){
					document.orderForm.submit();
				}
			}
	}
	
	function ckRecevier(){
		var errorMsg = "请填写收货人姓名";
		var recevier = $('recevier');
		if(isEmpty(recevier)==true){
			window.alert(errorMsg);
			return false;
		}
		return true;
	}
	
	function ckRecevierAddr(){
		var errorMsg = "请填写收货人地址";
		var recevierAddr = $('recevierAddr');
		if(isEmpty(recevierAddr)==true){
			window.alert(errorMsg);
			return false;
		}
		return true;
	}
	
	function ckAgree(){
		var errorMsg = "请同意网络交易条款";
		var agree = document.getElementById('agree');
		//alert(agree.checked);
		if(agree.checked==false){
			window.alert(errorMsg);
			return false;
		}
		return true;
	}
	
	function ckOrderForm(){
		if(ckRecevier()==false){
			return false;
		}else if(ckRecevierAddr()==false){
			return false;
		}else if(ckAgree()==false){
			return false;
		}
		
		return true;
	}
	
</script>
<body style="background-color: #769b72;">
<div id="allcontent">
    	<div>
			<c:import url="/jsps/front/head.jsp"/>
		</div>

		<div id="headerFooterDiv">
			<DIV class=order_step>
				<img title="2" style="repeat-x 50% top" src="<c:url value="/jsps/front/images/order_step_2.jpg"/>"/>
			</DIV>
		</div>	
	<form name="orderForm" action="<c:url value="/goodMgr?act=createOrder"/>" method="post">
		<div id="containerBodyDiv">
			<div id="detail">
				<div id="detailFirst" style="border-bottom:2px dotted #878787;
											padding-bottom:20px;">
					<span id="detailHeader">收货人信息</span>
					
					<div style="width:100%;height:100%">
						<div id="reciverUpdateInforDiv">
							<div id="line">
								<label style="padding-left:12px;">收货人：</label>
								<span><input type="text" name="receiver" id="recevier"></span><br>
							</div>
							<div id="line">
								<label>收货地址：</label>
								<span><input type="text" name="receiverAddr" id="recevierAddr"></span><br>
							</div>
							
						</div>
					</div>
				</div>
				
				<div id="detailThree" style="border-bottom:2px dotted #878787;
											 padding-top:20px;
											 padding-bottom:20px;"> 
					<span id="detailHeader">付款方式</span>
					<div id="payWayUpdateInfor">
						<div id="line">
								<label>付款方式：</label>
								<span>	
								    <input name="payMode" value="货到付狂" type="radio">货到付款
									<input name="payMode" value="银行汇款" type="radio" checked>银行汇款
									<input name="payMode" value="支付宝" type="radio">支付宝
								</span>
						</div>
					</div>
				</div>
				<div id="detailThree" style="border-bottom:2px dotted #878787;
											 padding-top:20px;
											 padding-bottom:20px;"> 
					<span id="detailHeader">收货方式</span>
					<div id="payWayUpdateInfor">
						<div id="line">
								<label>收货方式：</label>
								<span>	
								    <input name="getMode" value="邮局快递" type="radio" checked>邮局快递
									<input name="getMode" value="特快邮递" type="radio">特快邮递
								</span>
						</div>
					</div>
				</div>
				<div id="detailFour" style="border-bottom:1px solid #878787;
											padding-top:20px;
											padding-bottom:20px;">
					<span id="detailHeader">商品清单</span>
					<div id="merchandiseShowInfor">
						<table cellspacing=0 cellpadding=0 border=0 class="listable">
							<thead style="background-color:#FCE8B1;height:20px;">
								<th>商品名称</th>
								<th>市场价格</th>
								<th>数量(件)</th>
								<th>小计</th>
							</thead>
						<c:forEach items="${cart.items}" var="item">
							<tr  style="height:30px;">
								<td>${item.good.goodsName}</td>
								<td>￥<fmt:formatNumber value="${item.good.goodsPrice}" pattern="0.00"/></td>
								<td>${item.goodNum}</td>
								<td>￥<fmt:formatNumber value="${item.totalPrice}" pattern="0.00"/></td>
							</tr>
						</c:forEach>
							<tr>
								<td colspan="4" style="font-size:12px;height:30px; text-align:right">
									商品金额总计：￥<fmt:formatNumber value="${cart.cartAmount}" pattern="0.00"/>元
								</td>
								
							</tr>
						</table>
						
					</div>
				</div>
				<div style="border:1px solid green;width:100%;height:100px;">
					<img src="<c:url value="/jsps/front/images/home/sumbitButton.gif"/>" 
						 style="cursor:hand;
								float:right;
								margin-top:55px;
								margin-left:5px;"
						 onclick="goBalance();"/>
					
					<span style="float:right;
								 margin-top:70px;
								 font-size:12px;
								 COLOR: #404040;
								 font-family:'宋体', 'Arial','Helvetica','sans-serif';">
						<input type="checkbox" name="agree" id="agree"/>请核对以上信息，点击“提交定单”即同意交易条款
					</span>

				</div>
			</div>
			
		</div>


	</form>
	<!--页体结尾-->
<div style="clear:both;"></div>
	        <div id="footer" style="margin-top:10px;width:960px;border-top:1px solid; COLOR: #404040;COLOR: #666; text-align:center; background-color:#fff;font-size:12px;">
	        <%=VersionInfo.buildFooterStr()%>       
	        </div>
</div>



</body>
</html>

